function photoPreview(holderId, inputId) {
	var photoInput = document.getElementById(inputId);
	var previewHolder = document.getElementById(holderId);
	var previewId = inputId + '-preview';
	photoInput.onchange = function (e) {
		e.preventDefault();
		var file = photoInput.files[0],
		reader = new FileReader();
		reader.onload = function (event) {
			if (document.getElementById(previewId)) {
				document.getElementById(previewId).src = event.target.result;
			} else {
				var preview = new Image();
				preview.id = previewId;
				preview.src = event.target.result;
				$(preview).addClass('preview');
				previewHolder.appendChild(preview);
			}
		};
		reader.readAsDataURL(file);
		return false;
	};
};